#include <motion_controller/motion_controller_node.h>

/******************************************************
 * 主函数 * 
 ******************************************************/
int main(int argc, char** argv){
    FLAGS_alsologtostderr = true;           // 日志同时输出到stderr
    FLAGS_max_log_size = 1;                 // 单个日志文件大小上限（MB）, 如果设置为0将默认为1
	FLAGS_stop_logging_if_full_disk = true; // 当磁盘写满时，停止输出
    FLAGS_minloglevel = google::WARNING;    // 只记录大于{}等级的日志

    google::InitGoogleLogging(argv[0]);

    ros::init(argc, argv, "motion_controller_node");

    FLAGS_log_dir = "/home/xxty/user_config/logs";
    setlocale(LC_ALL,"");   //ROS_INFO 中文显示, 需要添加头文件#include <sstream>

    LOG(INFO) << "GLOG Init!";
	
    ROS_INFO("motion_controller_node initializating......");
    ros::NodeHandle nh;
    setlocale(LC_ALL,"");   //ROS_INFO 中文显示, 需要添加头文件#include <sstream>
    tf2_ros::Buffer tfBuffer(::ros::Duration(10));
    tf2_ros::TransformListener tfListener(tfBuffer);
    MotionController motion_planner(&tfBuffer);
    ros::spin();

    google::ShutdownGoogleLogging();
    return 0;
}